<div>
<h1>常用设置</h1>
<pre>
<span id=":set nocompatible">:set nocompatible</span>   <span>设置不兼容原始 vi 模式（必须设置在最开头）</span>
<span id=":set bs=?">:set bs=?</span>           <span>设置BS键模式，现代编辑器为 :set bs=eol,start,indent</span>
<span id=":set sw=4">:set sw=4</span>           <span>设置缩进宽度为 4</span>
<span id=":set ts=4">:set ts=4</span>           <span>设置制表符宽度为 4</span>
<span id=":set noet">:set noet</span>           <span>设置不展开 tab 成空格</span>
<span id=":set et">:set et</span>             <span>设置展开 tab 成空格</span>
<span id=":set winaltkeys=no">:set winaltkeys=no</span>  <span>设置 GVim 下正常捕获 ALT 键</span>
<span id=":set nowrap">:set nowrap</span>         <span>关闭自动换行</span>
<span id=":set ttimeout">:set ttimeout</span>       <span>允许终端按键检测超时（终端下功能键为一串ESC开头的扫描码）</span>
<span id=":set ttm=100">:set ttm=100</span>        <span>设置终端按键检测超时为100毫秒</span>
<span id=":set term=?">:set term=?</span>         <span>设置终端类型，比如常见的 xterm</span>
<span id=":set ignorecase">:set ignorecase</span>     <span>设置搜索是否忽略大小写</span>
<span id=":set smartcase">:set smartcase</span>      <span>智能大小写，默认忽略大小写，除非搜索内容里包含大写字母</span>
<span id=":set list">:set list</span>           <span>设置显示制表符和换行符</span>
<span id=":set number">:set number</span>         <span>设置显示行号，禁止显示行号可以用 :set nonumber</span>
<span id=":set relativenumber">:set relativenumber</span>  <span>设置显示相对行号（其他行与当前行的距离）</span>
<span id=":set paste">:set paste</span>          <span>进入粘贴模式（粘贴时禁用缩进等影响格式的东西）</span>
<span id=":set nopaste">:set nopaste</span>        <span>结束粘贴模式</span>
<span id=":set spell">:set spell</span>          <span>允许拼写检查</span>
<span id=":set hlsearch">:set hlsearch</span>       <span>设置高亮查找</span>
<span id=":set ruler">:set ruler</span>          <span>总是显示光标位置</span>
<span id=":set incsearch">:set incsearch</span>      <span>查找输入时动态增量显示查找结果</span>
<span id=":set insertmode">:set insertmode</span>     <span>Vim 始终处于插入模式下，使用 ctrl-o 临时执行命令</span>
<span id=":set all">:set all</span>            <span>列出所有选项设置情况</span>
<span id=":syntax on">:syntax on</span>          <span>允许语法高亮</span>
<span id=":syntax off">:syntax off</span>         <span>禁止语法高亮</span>
</pre>
</div>